package com.ziki.common.util.io;

import com.ziki.common.util.string.HexUtil;

public class Out {

    public static void println(Object o) {
        System.out.println(o.toString());
    }

    public static void print(Object o) {
        System.out.print(o.toString());
    }

    public static void printByte(byte[] b) {
        print(b, true);
    }

    public static void print(byte[] b, boolean isHex) {
        for (byte aByte : b) {
            if (isHex) {
                print(Integer.toHexString(aByte & 0xFF));
            } else {
                print(aByte);
            }
            print(" ");
        }
        println("");
    }

    public static void print(byte[] b) {
        println(HexUtil.byteToHexStr(b));
    }
}
